\doxysection{Jerky.\+Core.\+Jerky\+Engine Class Reference}
\hypertarget{class_jerky_1_1_core_1_1_jerky_engine}{}\label{class_jerky_1_1_core_1_1_jerky_engine}\index{Jerky.Core.JerkyEngine@{Jerky.Core.JerkyEngine}}


Jerky引擎  


\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_jerky_1_1_core_1_1_jerky_engine_a040f8fc5d5a0df0417038b43946ebcca}{Jerky\+Engine}} (string path)
\begin{DoxyCompactList}\small\item\em 构造方法 \end{DoxyCompactList}\item 
async Task$<$ int $>$ \mbox{\hyperlink{class_jerky_1_1_core_1_1_jerky_engine_a3baed666ad07b3524ce8a3c3691b9254}{Replace\+Bookmarks\+Async}} (IDictionary$<$ string, object $>$ bookmark\+Replacements)
\begin{DoxyCompactList}\small\item\em 替换书签 \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Properties}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{class_jerky_1_1_core_1_1_jerky_engine_a94de2ab95b1b1c953791115a57926acf}{Trim\+Number}}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em 是否去除数字 \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Jerky引擎 

进行书签替换操作


\begin{DoxyCode}{0}
\DoxyCodeLine{var\ path\ =\ \textcolor{stringliteral}{"{}path/to/your\ docx\ file"{}};}
\DoxyCodeLine{var\ engine\ =\ \textcolor{keyword}{new}\ \mbox{\hyperlink{class_jerky_1_1_core_1_1_jerky_engine_a040f8fc5d5a0df0417038b43946ebcca}{JerkyEngine}}(path);}
\DoxyCodeLine{}
\DoxyCodeLine{var\ dict\ =\ \textcolor{keyword}{new}\ Dictionary<string,string>}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \ [\textcolor{stringliteral}{"{}XAUAT"{}}]\ =\ \textcolor{stringliteral}{"{}西建大"{}},}
\DoxyCodeLine{\ \ \ \ [\textcolor{stringliteral}{"{}MIFANS"{}}]\ =\ \textcolor{stringliteral}{"{}米粉"{}}}
\DoxyCodeLine{\};}
\DoxyCodeLine{E}
\DoxyCodeLine{var\ replacedTags\ =\ engine.ReplaceBookmarksAsync(dict).Result;}
\DoxyCodeLine{\textcolor{comment}{//\ var\ replacedTags\ =\ await\ engine.ReplaceBookmarksAsync(dict);}}
\DoxyCodeLine{Console.WriteLine(\$\textcolor{stringliteral}{"{}操作完成，共替换\{replacedTags\}处书签"{}});}

\end{DoxyCode}
 

\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{class_jerky_1_1_core_1_1_jerky_engine_a040f8fc5d5a0df0417038b43946ebcca}\index{Jerky.Core.JerkyEngine@{Jerky.Core.JerkyEngine}!JerkyEngine@{JerkyEngine}}
\index{JerkyEngine@{JerkyEngine}!Jerky.Core.JerkyEngine@{Jerky.Core.JerkyEngine}}
\doxysubsubsection{\texorpdfstring{JerkyEngine()}{JerkyEngine()}}
{\footnotesize\ttfamily \label{class_jerky_1_1_core_1_1_jerky_engine_a040f8fc5d5a0df0417038b43946ebcca} 
Jerky.\+Core.\+Jerky\+Engine.\+Jerky\+Engine (\begin{DoxyParamCaption}\item[{string}]{path}{}\end{DoxyParamCaption})}



构造方法 


\begin{DoxyParams}{Parameters}
{\em path} & 文档路径\\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\Hypertarget{class_jerky_1_1_core_1_1_jerky_engine_a3baed666ad07b3524ce8a3c3691b9254}\index{Jerky.Core.JerkyEngine@{Jerky.Core.JerkyEngine}!ReplaceBookmarksAsync@{ReplaceBookmarksAsync}}
\index{ReplaceBookmarksAsync@{ReplaceBookmarksAsync}!Jerky.Core.JerkyEngine@{Jerky.Core.JerkyEngine}}
\doxysubsubsection{\texorpdfstring{ReplaceBookmarksAsync()}{ReplaceBookmarksAsync()}}
{\footnotesize\ttfamily \label{class_jerky_1_1_core_1_1_jerky_engine_a3baed666ad07b3524ce8a3c3691b9254} 
async Task$<$ int $>$ Jerky.\+Core.\+Jerky\+Engine.\+Replace\+Bookmarks\+Async (\begin{DoxyParamCaption}\item[{IDictionary$<$ string, object $>$}]{bookmark\+Replacements}{}\end{DoxyParamCaption})}



替换书签 


\begin{DoxyParams}{Parameters}
{\em bookmark\+Replacements} & 书签字典\texorpdfstring{$<$}{<}书签名称,书签值(字符串替换)\texorpdfstring{$>$}{>}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em File\+Not\+Found\+Exception} & 模板文件不存在\\
\hline
\end{DoxyExceptions}


\doxysubsection{Property Documentation}
\Hypertarget{class_jerky_1_1_core_1_1_jerky_engine_a94de2ab95b1b1c953791115a57926acf}\index{Jerky.Core.JerkyEngine@{Jerky.Core.JerkyEngine}!TrimNumber@{TrimNumber}}
\index{TrimNumber@{TrimNumber}!Jerky.Core.JerkyEngine@{Jerky.Core.JerkyEngine}}
\doxysubsubsection{\texorpdfstring{TrimNumber}{TrimNumber}}
{\footnotesize\ttfamily \label{class_jerky_1_1_core_1_1_jerky_engine_a94de2ab95b1b1c953791115a57926acf} 
bool Jerky.\+Core.\+Jerky\+Engine.\+Trim\+Number\hspace{0.3cm}{\ttfamily [get]}, {\ttfamily [set]}}



是否去除数字 

若出现模板中多个书签对应同一个值时，可以将此值设为\+True,并且书签后可加数字用于区分，替换时将忽略书签后的数字

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
D\+:/\+Desktop/\+Document\+Making/\+Jerky/\+Core/Jerky\+Engine.\+cs\end{DoxyCompactItemize}
